const type = {
  SET_EVALUATION: 'SET_EVALUATION'
}

const state = {
  evaluation: false
}

const getters = {
  evaluation: (state) => state.evaluation
}

const mutations = {
  [type.SET_EVALUATION](state, evaluation) {
    if (evaluation) state.evaluation = evaluation;
    else state.evaluation = false
  }
}

const actions = {
  setEvaluation: ({commit}, evaluation) => {
    commit(type.SET_EVALUATION, evaluation)
  }
}

export default {
  state,
  getters,
  mutations,
  actions
}
